This folder contains the data and code needed to replicate all analyses
presented in "American Partisans Vastly Under-Estimate the Diversity of Other
Partisans' Policy Attitudes" by Nicholas C. Dias, Yphtach Lelkes, and Jacob
Pearl.

Data can be found in the `data` folder. Code can be found in the `code` folder.
Output figures can be found in the `figures` folder. Finally, output tables can
be found in the `tables` folder.

`replicate.R` replicates all analyses in the order that they are presented in
our main paper and, subsequently, our appendix.

If you wish to run individual scripts, you must run `install.R` beforehand. This
script installs the right versions of all necessary packages using the
[`groundhog`](https://groundhogr.com/) package.

`preamble.R` is run at the top of every script. This script silences superfluous
messages and writes some necessary functions.

Finally, `perceived_dist_question.js` contains the JavaScript code that we used
within Qualtrics to administer the perceived-distribution task.

Several of our studies included `correction' experiments that we will analyze in
other manuscripts. Where we utilize variables that were collected after the
treatments in those experiments, we drop participants in the experimental
conditions (e.g., "dist_correct") and retain only participants in the control
conditions (e.g., "dist_no_correct").

This README file sits in the root directory. All file paths referenced in our
code files start from this directory. All analyses were executed with R version
4.3.2 from the operating system macOS Sonoma 14.5.
